<template>
  <div>
    <div>
      <el-menu
        :default-active="activeIndex"
        class="el-menu-demo"
        mode="horizontal"
        router
        @select="handleSelect"
      >
        <el-menu-item index="/game/2048">2048</el-menu-item>
        <el-menu-item index="/game/jing">井字棋</el-menu-item>
      </el-menu>
    </div>
    <NuxtPage></NuxtPage>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
definePageMeta({
  redirect: '/game/2048'
});

const activeIndex = ref("/game/2048");
const handleSelect = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
</script>

<style lang="scss" scoped></style>
